package com.itheima_12;

import java.util.Map;
import java.util.Set;
import java.util.TreeMap;

public class test_12_6 {
    public static void main(String[] args) {
        TreeMap<Student,String> tm=new TreeMap<>();
        Student s=new Student("XIAO",23,25,94);
        Student s1=new Student("CIAO",23,25,93);
        Student s2=new Student("ASDK",23,25,93);
        tm.put(s,"湖南");
        tm.put(s1,"上海");
        tm.put(s2,"广东");
        Set<Map.Entry<Student, String>> entries = tm.entrySet();
        for (Map.Entry<Student, String> entry : entries) {
            System.out.println(entry.getKey()+"---"+entry.getValue());
        }
    }
}
